<template>
    <div class="box">
        <h1>我的值是{{count}}</h1>
        <button @click="count++">点击累加</button>
        <p>{{obj}}</p>
        <button @click="changeObj">点击变化</button>
    </div>
</template>

<script>
    export default {
        name : 'Heater',
        props:['count','obj'],
        methods :{
            changeObj(){
                this.obj.name = 'xiaohei'
            }
        }
    }
</script>

<style lang="css" scoped>
    .box{
        height: 200px;
        background: skyblue;
    }
</style>